<include file='Public:head' />
<body class="J_scroll_fixed">
<div class="wrap J_check_wrap">
	<div class="nav">
		<ul class="cc">
			<li class="current"><a href="javascrip:;">栏目列表</a></li>
			<li ><a href="{:U('Category/add')}">添加栏目</a></li>
			<li ><a href="{:U('Category/update_cache')}">更新栏目缓存</a></li>
		</ul>
	</div>
  <form name="myform" action="{:U('Category/sort')}" method="post" class="J_ajaxForm">
  <div class="table_list">
    <table width="100%">
        <colgroup>
	        <col width="50">
	        <col width="55">
	      
	        <col>
	        <col width="80">
	        <col width="100">
	        <col width="50" >
	        <col width="300">
        </colgroup>
        <thead>
          <tr>
          	<td>Cid</td>
            <td align='center'>排序</td>
            <td>栏目名称</td>
            <td align='center'>栏目类型</td>
            <td>所属模型</td>
            <td align='center'>访问</td>
            <td align='center'>管理操作</td>
          </tr>
        </thead>
        <if condition='$category'>
		      <volist name='category' id='value'>
        	<tr cid='{$value.cid}' <if condition="$value['pid'] eq 0">class="top"</if> >
        	<td> {$value.cid}</td>
    			 <td align='center'>
    				<input name='sort[{$value.cid}]' type='text' size='3' value='{$value.sort}' class='input'>
    			</td>
  			
			   <td >
				
				<if condition="$value['pid'] eq 0 && Third\Data::hasChild(S('category'),$value['cid'])">
					<img src="__PUBLIC__/images/contract.gif" action="2" class="explodeCategory hand"/>
				</if>
				<if condition="$value['pid'] eq 0"> 
					<strong>{$value._name}</strong>
				<else/>
					{$value._name}
				</if>

			</td>
			<td  align='center'>{$value.type}</td>
			<td>{$value.model}</td>
			<td align='center'><a href='<if condition="$value['cat_type'] eq 4">{:U('/'.strtolower($value['remark'])."_v_".$value['cid'])}<else />{:U('/'.strtolower($value['remark'])."_l_".$value['cid'])}</if>' target='_blank'>访问</a></td>
			<td align='center' >
				<a href="{:U('Category/add',array('pid'=>$value['cid']))}">添加子栏目</a> | 
				<a href="{:U('Category/edit',array('cid'=>$value['cid']))}">修改</a> | 
				<a class="J_ajax_del" href="{:U('Category/del',array('cid'=>$value['cid']))}">删除</a>  
			</td>
		</tr>
		</volist>
    <else />
        <tr>
          <td colspan="7">没有找到任何符合条件记录</td>
        </tr>
    </if>
	</table>
    <div class="btn_wrap">
      <div class="btn_wrap_pd">
        <button class="btn btn_submit mr10 J_ajax_submit_btn" type="submit">排序</button>
      </div>
    </div>
  </div>

</form>
</div>
<script type="text/javascript" src="__PUBLIC__/js/mod.common.js"></script>
<script>
var PUBLIC = '__PUBLIC__';
</script>
<script type="text/javascript" src="__PUBLIC__/js/mod.category.js"></script>
</body>
</html>